<?php
namespace app\home\model;
use \think\Db;
class CommunityModel
{
    /**
     * 列表
     */
    public function communityList(){
        $communityList = Db::table('community')->where('is_del = 0')->order('create_time desc')->select();
        return $communityList;
    }

    /**
     * 话题页面的单条查询
     */
    public function communityDetails($id){
        $communityDetails = Db::table('community')->where("id = $id and is_del = 0")->find();
        return $communityDetails;
    }

}